#include <bits/stdc++.h>
using namespace std;
int main(){
freopen("duel.in","r",stdin);
freopen("duel.out","w",stdout);
int n,a;
cin>>n>>a;
if(n==1) cout<<"1";
else if(n==10) cout<<"8";

return 0;
}
